<html>
	<head>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7/dojo/dojo.js"></script>
    </head>
    <body>

        <div id="divFirst" style="padding: 10px; border: 1px solid red;">
            Нажми на меня!
        </div>
        <script type="text/javascript">
            dojo.ready(function(){
                dojo.query("#divFirst").onclick(function(e){
                    var node = e.target;

                    var a = dojo.anim(node, {
                        backgroundColor: "#ffff00",
                        color: "#00ffff"
                    }, 1000);

                    dojo.connect(a, "onEnd", function() {
                        dojo.anim(node, { color: "#00ffff" }, null, null, function(){
                            node.innerHTML = "Гут!";
                            dojo.anim(node, { color: "ffff00" });
                        });
                    });
                });
            });
        </script>    
    </body>
</html>